//
//  B_MerchantOrderVC.m
//  DreamOf
//
//  Created by 薛小刚 on 2018/8/29.
//  Copyright © 2018年 薛小刚. All rights reserved.
//

#import "B_MerchantOrderVC.h"
#import "MainSelectTypeViewController.h"
#import "B_MerchantDoneVC.h"
#import "B_MerchantAllOrderVC.h"
#import "B_MerchantPaymentDoneVC.h"
#import "B_MerchantForPaymentOrderVC.h"

@interface B_MerchantOrderVC ()

@property (nonatomic, strong) MainSelectTypeViewController * mainPage;

@end

@implementation B_MerchantOrderVC

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setTitle:@"我的订单"];
    self.mainPage.view.hidden = NO;
}


- (MainSelectTypeViewController *)mainPage {
    if (!_mainPage) {
        _mainPage = [[MainSelectTypeViewController alloc] initWithFrame:CGRectMake(0, 5, SCREEN_WIDTH, SCREEN_HEIGHT_X - 64 - 5) titleArray:nil];
        _mainPage.type = B_SelectTypeCircularBead;
        [self.view addSubview:self.mainPage.view];
        [self addChildViewController:_mainPage];
        _mainPage.titleArray = @[@"全部", @"待付款", @"待收货", @"已完成"];
        B_MerchantAllOrderVC * all = [[B_MerchantAllOrderVC alloc] init];
        B_MerchantForPaymentOrderVC * forPayment = [[B_MerchantForPaymentOrderVC alloc] init];
        B_MerchantPaymentDoneVC * paymentDone = [[B_MerchantPaymentDoneVC alloc] init];
        B_MerchantDoneVC * done = [[B_MerchantDoneVC alloc] init];
        _mainPage.viewControllers = @[all, forPayment, paymentDone, done];
        _mainPage.block = ^(NSInteger index) {
            
        };
    }
    return _mainPage;
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
